export const state = () => ({
  token: '',
  test: '测试有没有被缓存',
  avatar: '',
  getIndex: ''
})

export const mutations = {
  addToken (state, payload) {
    state.token = payload
  },
  addAvatar (state, payload) {
    state.avatar = payload
  },
  setIndex (state, payload) {
    state.getIndex = payload
  }
}

export const actions = {
  SET_SETTING_ITEM ({ commit }, payload) {
    commit('addToken', payload)
  }
}
